import { request } from 'umi';
import qs from 'qs';

export async function login(params, options?: { [key: string]: any }) {
  return request<API.CurrentUser>('/api/based/login', {
    method: 'GET',
    // headers: {
    //   'Content-Type': 'application/json; charset=utf-8',
    // },
    params,
    ...(options || {}),
  });
}
export async function register(params, options?: { [key: string]: any }) {
  return request<API.CurrentUser>('/api/based/registered', {
    method: 'GET',
    // headers: {
    //   'Content-Type': 'application/json; charset=utf-8',
    // },
    params,
    ...(options || {}),
  });
}